<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jspf/taglibs.jspf"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
    <script type="text/javascript">
        localPath="setting"
    </script>
</head>
<body>
	<div class="p-h-md p-v bg-white box-shadow pos-rlt">
	  <h3 class="no-margin">消息提醒</h3>
	</div>
  <div class="tx-container">
  	<div class="">
  	  <h4 class="p-h-md tx-item">邮件提醒</h4>
  	  <form id="mail_notification_form" action="/ci/do_add_email" method="post">
  	  <table id="email_notification_div" class="table table-bordered table-hover">
  	    <thead>
                  <tr>
                    <th>
                       <input type="email" name="email" value="" id="tx-email" placeholder="输入邮箱" required="required" maxlength="100"></input>
                       <input type="submit" id="tx-email-btn"value="提交" class="btn btn btn-sm btn-primary"></input>
                    </th>
                  </tr>
                </thead>
                <tbody></tbody><colgroup><col>
                  <col width="100%">
                  </colgroup>
                  <tbody class="ci-list-table">
                      <c:if test="${!empty form.emails}">
                      	<c:forEach items="${form.emails }" varStatus="i" var="email">
                      <tr>
                          <td><span class="ci-item-text">${email.email} </span>[<a href="/ci/delete_email/${email.id}" data-method="post" data-confirm="确定删除?" class="ci-item-action-del">删除</a>]</td>
                      </tr>
                          </c:forEach>
                      </c:if>
                  </tbody>
  	  </table>
  	  </form>
  	</div>

  	<div class="">
        <h4 class="p-h-md tx-item wechat-item">微信提醒</h4>
        <img src="${form.weixinqr}" class="wechat-code">
    </div>
  </div>
  <script type="text/javascript" >
  $('#mail_notification_form').validate({
  	rules:{
  		loginName: {required:true, email:true, rangelength:[5,30]}
  	},
  	messages:{
  		loginName: {required:"请输入正确邮箱地址", email:"请输入正确邮箱地址", rangelength:"长度为5-100"}
  	}
  })
  </script>
</body>

</html>